1. Field of the Invention
The present invention relates to a method for reading a read-only memory medium, and, more particularly, to a method for reading a read-only memory medium in a drive for reading a read-only memory medium such as a CD-ROM.
2. Prior Art
A read-only memory medium such as a compact disc (CD) or a CD-ROM is being widely used as an information recording medium for audio-visual (AV) or a computer as it has a large capacity and is easy to use.
As defined by the Japanese Industrial Standard JIS S 8605 which is the standard for CDs and CD-ROMs (hereinafter comprehensively "CD-ROMs"), the recording scheme for CD-ROM is to record bit information consisting of long and short bits on the disk in a spiral track consisting of sequential recesses (grooves) from the inner periphery to the outer periphery.
For example, referring to FIG. 3 which is a block diagram showing an overall structure of a conventional CD-ROM drive for reading a CD-ROM described in Japanese Patent Application Laid-Open No. 4-89671 (Reference 1), the CD-ROM drive comprises a CD-ROM 1, a disk motor 2 for rotatingly driving the CD-ROM 1, a disk motor control 3 for controlling the rotation speed of the disk motor 2, a pickup 4 for reading bit information from the CD-ROM 1 with a laser beam a pickup control 5 for controlling focusing and tracking of the pickup 4 and for controlling its movement, an audio signal processor 6 for decoding audio data and subcodes from the read bit information, a CD-ROM signal processor 7 for decoding CD-ROM data from the audio data, a host computer interface 8 for interfacing a host computer 11, a system controller 9 for controlling the entire CD-ROM drive, a memory 10, and the host computer 11.
Now, referring to FIG. 3, description is made on the operation of the CD-ROM drive. The disk motor control 3 controls the disk motor 2 so that the CD-ROM 1 can be rotated at a constant linear speed. The pickup control 5 controls focusing and tracking of the pickup 4 and its movement to read the bit information PD recorded on the CD-ROM 1 with the pickup 4. The audio signal processor 6 decodes the audio data A and the subcode S from the bit information PD, extracts a clock signal CK contained in the bit information PD, and supplies it to the disk motor control 3 as a feedback signal for controlling the rotation.
The CD-ROM signal processor 7 decodes the CD-ROM data from the audio data A, decodes a read block address which is an address assigned to the decoded CD-ROM data RD, and stores the CD-ROM data RD in the memory 10. In the following, called data read process is a series of operations and processing from reading of the bit information PD with the pickup 4 to outputting of the CD-ROM data RD and the read block address with the audio signal processor 6 and the CD-ROM signal processor 7.
The host computer interface 8 performs interfacing with the host computer 11 which acquires stored data in the CD-ROM 1 with the CD-ROM drive. That is, it supplies a read command RC provided by the host computer 11 which command is a command for reading the recorded data in the CD-ROM 1 to the system controller 9, and transfers the CD-ROM data RD decoded by the CD-ROM signal processor 7 to the host computer 11. The system controller 9 moves the pickup 4 to a location close to a read start block address specified by the read command RC with the pickup control 5. Then, it performs the data read process, compares the read start block addresses to detect a block specified by the read start block address, and transfers the CD-ROM data RD in the block to the host computer 11. Then, the data read process is continued to transfer the CD-ROM data in the number of read blocks specified by the read command one block after another to the host computer 11. In the following, called a seek operation is a series of operations and processing for detection of blocks at the specified block addresses by the movement of the pickup 4 and the data read process.
The system controller 9 performs the seek operation in response to the read command RC, and then transfers the read CD-ROM data RD to the host computer 11. After the transfer of CD-ROM data RD, the system controller 9 continues the data read process, and stores data recorded in the CD-ROM 1 one block after another in the memory 10 from an address following the read end address of the CD-ROM data RD transferred to the host computer 11. When the memory 10 becomes full, the system controller 9 terminates the data read process through the audio signal processor 6 and the pickup controller 5. In the following, called a buffering operation is the operation for storing the CD-ROM data RD in the memory 10 after transfer of the CD-ROM data RD to the host computer
Now, description is given on the operation of a first conventional method for reading a read-only memory medium with the CD-ROM drive by referring to FIG. 4 which is a flowchart for processing of an execution program for the system controller 9. First, the system controller 9 starts the read operation in response to receipt of a read command from the host computer 11 (step S1). It determines whether or not data for the address requested by the read command has been stored in the memory 10 (step S2). If so, it starts transfer of the data to the host computer 11. If the data has not been stored, it starts the seek process (step S4). After completion of the seek process, it starts the data read process (step S5), and starts transfer of the data to the host computer 11 after completion of the data read process (step S6). Once the data transfer completes, it returns the completion status of the read command for the data stored in the CD-ROM to the computer 1 (step S7). It starts the buffering process from the time when the CD-ROM drive completes the read process (step S8) to read data until the memory 10 becomes full.
The first method for reading the read-only memory medium performs the buffering process after returning the read data at any address as described above. In a case where a read command for an address following the returned read data arrives, and read data for the next address is not yet stored, the seek operation is always performed regardless of the current state of the drive because of no stored data. When the seek operation is performed, even if the drive is reading the same address, the read process is terminated and the same address is read again from its top, so that the data return time is as long as 100 ms.
Now, description is given on a second conventional method for reading a read-only memory medium which is improved for the above problems by referring to FIG. 5 which shows its flow chart with the same reference characters/numerals for the same components as in FIG. 4. This method shown in this figure differs from the first conventional method described above in that the second method additionally has between steps S2 and S4 step P3 for calculating seek time TS to a target address, step P4 for calculating data read time TR to the target address, and step P5 for determining which of the process time in steps P3 and P4 is longer.
Now, the processing operation is described with reference to FIG. 5. Similar to the first conventional method, the system controller 9 starts the read process in response to receipt of a read command (step S1), and determines whether or not data at the requested address has been stored in the memory 10 (step S2). If so, it proceeds to step S6 where it starts transfer of the data to the host computer 11. If the data has not been stored, it starts the seek operation from the current state, and calculates the seek time TS to the start of reading the requested CD-ROM data (step P3). In addition, if the current state is in the read process of data, it continues reading of data as is, and calculates the data read time TR to the start of the requested CD-ROM data (step P4). After the calculation, the seek time TS is compared with the data read time TR (step P5). If the seek time TS is shorter, the seek operation is performed (step S4). Thereafter, it performs the data read process (step S5), and transfers the data to the read host computer 11 (step S6). If the data read time TR is shorter, it continues the data read process as is, and transfers the data to the host computer 11 (step S6). Then, as in the first conventional method, at the completion of data transfer, it returns the completion status of the read command (step S7), and performs the buffering process (step S8).
As an example, it is assumed that the read command requests to read an address at 100 addresses ahead. If the seek time TS is calculated as 200 ms to read the requested address by performing the seek operation from the current state, and the read time TR is calculated as 340 ms to read the requested address by reading data from the current state as is, the seek time TS is shorter than the read time TR, so that the seek operation is performed. In addition, it is assumed that it is requested to read an address at 10 addresses ahead. If the seek time TS is calculated as 190 ms from the current state, and the read time TR is calculated as 34 ms from the current state, the read time TR is shorter than the seek time TS, so that the data read process is continued.
Referring to FIG. 6 which schematically shows seek time TS (line A) from the current state origin and read time TR performing data reading as is (line B), it is found that, if the address to be read next from the CD-ROM 1 is close to the current location, reading can be more quickly performed by continuing the data read process being currently performed, and that, if the address to be read next from the CD-ROM is farther than the current location, reading can be more quickly performed by performing the seek operation.
However, since there is a comparison/determination process for the processing time of the seek time TS and the read time TR, the capacity of a required program is increased.
Referring to FIG. 7 which schematically shows a file structure in the CD-ROM 1, the CD-ROM data is recorded at sequential addresses by file. While the current operation is to read the data, if the host computer 11 reads another file, data is read in the order of addresses sequential from the current data just read. In this case, it is obvious that the processing time is shorter when performing data reading than performing the seek operation.
It is because, in the case of a typical CD-ROM, the seek time is in a range of 150 ms-250 ms during which a quadruple speed CD-ROM drive can read only 45-60 sectors, so that the file read process rarely reads an address at 40-60 sectors ahead from the address read by the current read command.
In addition, when a plurality of files are copied to the host computer 11, which of the seek time and the read time is shorter is compared and determined upon receipt of a read command for a stored address of data of another file after one file is copied. In this case, since there is no limitation of address assignment between both files as in the read process, in most cases, the seek time is determined to be shorter.
Therefore, the comparison and determination on the seek and the read time can be said to be a redundant process in the second conventional method for reading a read-only memory medium.
Since the first conventional method for reading a read-only memory medium as described above always performs the seek operation upon receipt of a read command regardless of the current state of the drive, there is a disadvantage that it takes a long period of time from the time when the host computer issues the read command to the time when CD-ROM data is returned.
In addition, since the second conventional method for reading a read-only memory medium has a redundant process for comparison and determination of the processing time of the seek and the read time, there is a disadvantage that the capacity of required program is increased.